package com.haoniu.module.domain.database;

import com.haoniu.common.base.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 用户表 user
 *
 * @author houyijun
 * @date 2019-01-24
 */
public class User extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**  */
    private Integer id;
    /**
     * 邀请码
     */
    private String inviteCode;
    /**
     * 推荐人ID(parentId)
     */
    private Integer recommendUserId;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 昵称
     */
    private String nickName;
    /**
     * 真实姓名
     */
    private String realName;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 地区
     */
    private String area;
    /**
     * 头像
     */
    private String headImg;
    /**
     * 用户类型(0普通用户 1 平台用户 2 机器人 3 客服)
     */
    private Integer userType;
    /**
     * 机器人类型 1-抢包 2-发包
     */
    private Integer robotType;
    /**
     * 是否避雷 0 不避雷 1 避雷
     */
    private Integer leiType;
    /**
     * 密码
     */
    private String password;
    /**
     * 盐加密
     */
    private String salt;
    /**
     * 用户登陆的token
     */
    private String tokenId;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;
    /**
     * 是否删除(0正常 2删除)
     */
    private Integer delFlag;
    /**
     * 是否群主
     */
    private Integer roomBoss;

    /**
     *  单雷点概率
     */
    private Integer leiPercent;
    /**
     *  多雷 1个雷的概率
     */
    private Integer oneLeiPercent;
    /**
     *  双雷点概率
     */
    private Integer twoLeiPercent;
    /**
     *  三雷点概率
     */
    private Integer threeLeiPercent;

    /**
     * 抽奖次数
     */
    private Integer lotteryCount;

    private UserWallet userWallet;

    private BigDecimal money;

    private BigDecimal freezeMoney;

    public Integer getLotteryCount() {
        return lotteryCount;
    }

    public void setLotteryCount(Integer lotteryCount) {
        this.lotteryCount = lotteryCount;
    }

    public UserWallet getUserWallet() {
        return userWallet;
    }

    public void setUserWallet(UserWallet userWallet) {
        this.userWallet = userWallet;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public BigDecimal getFreezeMoney() {
        return freezeMoney;
    }

    public void setFreezeMoney(BigDecimal freezeMoney) {
        this.freezeMoney = freezeMoney;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setRecommendUserId(Integer recommendUserId) {
        this.recommendUserId = recommendUserId;
    }

    public Integer getRecommendUserId() {
        return recommendUserId;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getRealName() {
        return realName;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getSex() {
        return sex;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getArea() {
        return area;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setRobotType(Integer robotType) {
        this.robotType = robotType;
    }

    public Integer getRobotType() {
        return robotType;
    }

    public void setLeiType(Integer leiType) {
        this.leiType = leiType;
    }

    public Integer getLeiType() {
        return leiType;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getSalt() {
        return salt;
    }

    public void setTokenId(String tokenId) {
        this.tokenId = tokenId;
    }

    public String getTokenId() {
        return tokenId;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public Integer getRoomBoss() {
        return roomBoss;
    }

    public void setRoomBoss(Integer roomBoss) {
        this.roomBoss = roomBoss;
    }

    public Integer getLeiPercent() {
        return leiPercent;
    }

    public void setLeiPercent(Integer leiPercent) {
        this.leiPercent = leiPercent;
    }

    public Integer getOneLeiPercent() {
        return oneLeiPercent;
    }

    public void setOneLeiPercent(Integer oneLeiPercent) {
        this.oneLeiPercent = oneLeiPercent;
    }

    public Integer getTwoLeiPercent() {
        return twoLeiPercent;
    }

    public void setTwoLeiPercent(Integer twoLeiPercent) {
        this.twoLeiPercent = twoLeiPercent;
    }

    public Integer getThreeLeiPercent() {
        return threeLeiPercent;
    }

    public void setThreeLeiPercent(Integer threeLeiPercent) {
        this.threeLeiPercent = threeLeiPercent;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("inviteCode", getInviteCode())
                .append("recommendUserId", getRecommendUserId())
                .append("phone", getPhone())
                .append("nickName", getNickName())
                .append("realName", getRealName())
                .append("sex", getSex())
                .append("area", getArea())
                .append("headImg", getHeadImg())
                .append("userType", getUserType())
                .append("robotType", getRobotType())
                .append("leiType", getLeiType())
                .append("password", getPassword())
                .append("salt", getSalt())
                .append("tokenId", getTokenId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .append("roomBoss", getRoomBoss())
                .append("leiPercent",getLeiPercent())
                .append("oneLeiPercent",getOneLeiPercent())
                .append("twoLeiPercent",getTwoLeiPercent())
                .append("threeLeiPercent",getThreeLeiPercent())
                .toString();
    }
}
